1. Field of the Invention
The present invention relates to an image compression apparatus for compressing still image data.
2. Description of the Background Art
As formats for compressing still image data, conventionally, the JPEG (Joint Photographic Experts Group) format has been widely used. Further, the HD Photo format which allows prevention of degradation of images and ensures high compression ratio, as compared with the JPEG format, has been developed. The HD Photo format is discussed in detail in Non-Patent Documents, such as “HD Photo—Photographic Still Image File Format” (Nov. 7, 2006, Microsoft Corporation, URL: http://www.microsoft.com/whdc/xps/hdphotodpk.mspx) and “Coding of Still Pictures” (Dec. 19, 2007, International Organisation for Standardisation and International Electorotechnical Commission, URL: http://www.itscj.ipsj.orjp/sc29/open/29view/29n9026t.doc)
An image compression apparatus based on the HD Photo format (hereinafter, referred to simply as an “image compression apparatus”) performs frequency conversion of an original image data on a macroblock-by-macroblock basis, to generate DC (direct current) component data and two types of AC (alternating current) component data. One of the two types of AC component data is low-pass component data called “Low Pass” and the other one is high-pass component data called “High Pass”. The image compression apparatus performs quantization and predictive coding of these component data, to generate DC quantization data, low-pass quantization data and high-pass quantization data.
A quantization data of each component is divided into coding object data which is to be entropy coded and additional data which is not to be entropy coded. The image compression apparatus generates coded data from the coding object data by entropy coding, to generate compressed image data. Thus, since the object for entropy coding is limited in the HD Photo format, the load of the image compression process is suppressed.
FIG. 9 is a schematic diagram showing a bit stream 80 forming the compressed image data in the HD Photo format. In the HD Photo format, the original image data is processed by the macroblock consisting of 16×16 pixels and the bit stream 80 corresponding to the macroblock is thereby generated.
The bit stream 80 includes a DC component stream 81, a low-pass component stream 82 and a high-pass component stream 83. The DC component stream 81 consists of pattern information 811 and stream data 812. The low-pass component stream 82 consists of pattern information 821 and stream data 822. The high-pass component stream 83 consists of pattern information 831 and stream data 832.
Each of the pattern information 811, 821 and 831 is called “cbp (Code Block Pattern)”, which indicates whether the coding object data of its corresponding component is zero or not. Each of the stream data 812, 822 and 832 consists of the coded data of its corresponding component and a flex bit generated from the additional data of its corresponding component.
FIG. 10 is a view showing a constitution of a coding part 94 of an image compression apparatus in the background art. The coding part 94 generates the bit stream 80 from the quantization data of each component. The coding part 94 comprises an extracting part 941, a coding object data memory 942, an additional data memory 943, an entropy coding part 944, an additional data processing part 945, a pattern information generation part 946 and a bit stream generation part 947.
The operation of the coding part 94 will be discussed, taking a case where the low-pass quantization data having fifteen pieces of quantization factor data is inputted, as an example. The extracting part 941 extracts low order data having a predetermined data length out of each quantization factor data and writes the low order data into the additional data memory 943 as low-pass additional data. Further, the extracting part 941 extracts data (high order data) other than the low order data out of each quantization factor data and writes the high order data into the coding object data memory 942 as low-pass coding object data.
The entropy coding part 944 reads the low-pass coding object data out from the coding object data memory 942 and performs entropy coding thereon to generate the low-pass coded data. The additional data processing part 945 arranges the fifteen pieces of low order data written in the additional data memory 943 in a predetermined order, to generate a low-pass flex bit. The pattern information generation part 946 reads the low-pass coding object data out from the coding object data memory 942 and checks if each high order data is zero or not, to generate the pattern information 821. The bit stream generation part 947 outputs the pattern information 821, the low-pass coded data and the low-pass flex bit in this order, to generate the low-pass component stream 82.
FIG. 11 is a time chart showing an operation timing of each data in the coding part 94. In a case, for example, where the coding part 94 processes the low-pass quantization data, the pattern information generation part 946 reads the low-pass coding object data out from the coding object data memory 942 during the period from the time T8 to the time T10 and generates the pattern information 821 during the period from the time T9 to the time T11. This is because the pattern information 821 needs to be generated first since the pattern information 821 is arranged before the stream data 822 consisting of the low-pass coded data and the low-pass flex bit.
The entropy coding part 944 can not access the coding object data memory 942 during the period from the time T8 to the time T10, falling into a standby state. The entropy coding part 944 starts to read the low-pass coding object data from the time T11 when the pattern information generation part 946 finishes reading of the low-pass coding object data. Similarly, the entropy coding part 944 falls into the standby state also during the period from the time T4 to the time T6 while the pattern information generation part 946 reads out the DC coding object data and during the period from the time T12 to the time T14 while the pattern information generation part 946 reads the high-pass coding object data.
Further, the pattern information generation part 946 can not access the coding object data memory 942 during the periods (from the time T6 to the time T8, from the time T10 to the time T12 and from the time T14 to the time T16) while it reads the coding object data out from the entropy coding part 944, falling into the standby state.
Thus, in the image compression apparatus having the coding part 94, since there occurs a standby time in the entropy coding part 944 and the pattern information generation part 946, this disadvantageously causes a delay in generation of the bit stream 80.